﻿@using SrBBSPro.Entities
@model User
@{
    ViewBag.Title = "用户中心";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}

<div class="main layui-clear">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>用户中心</legend>
    </fieldset>
    <div class="wrap">
        <div class="content">
            <div class="fly-tab user-tab">
                <span id="LAY-mine">
                    <a href="javascript:;" class="tab-this" type="post">我的求解（<cite>@Model.PostCount</cite>）</a>
                    <a href="@Url.Action("Message","Account")">我的消息</a>
                    <a href="@Url.Action("Home", "Account")">我的主页</a>
                    <a id="skill" href="javascript:;">我的技能</a>
                    <a href="javascript:;"  type="project">我的项目</a>
                </span>
            </div>
            <div class="user-mine">
                <ul class="mine-view jie-row" style="display:block;">
                    <li class="fly-none"></li>
                </ul>
                <ul class="mine-view jie-row" style="display:none;">
                    <li class="fly-none"></li>
                </ul>
            </div>
            <div id="LAY-page"></div>
        </div>
    </div>

    <div class="edge">
        <div class="user-about">
            <a href="/user/set#avatar" title="修改头像">
                <img class="user-avatar" src="@Model.HeadPortrait">
            </a>
            <p>
                <span style="color:#333">@Model.StaffName</span>
                @if (Model.Gender == "1")
                {
                    <i class="layui-icon layui-icon-male" style="color:#10B1EF"></i>
                }
                else
                {
                    <i class="layui-icon layui-icon-female" style="color:#FF0000"></i>
                }
            </p>
            <p>
                <span>工号：@Model.Id</span>
                <span>
                    积分：<em style="color:#FF7200">@Model.Integral</em>
                </span>
            </p>
            <p>
                <span>部门：@Model.DepartName</span>
                <span>职务：@Model.Position</span>
            </p>
            <div class="layui-inline" id="colck"></div>
        </div>
    </div>
</div>
@section scripts{
    <script>
        layui.use(['laydate', 'form','jquery'], function () {
            var laydate = layui.laydate;
            var $ = layui.jquery;
            laydate.render({
                elem: '#colck'
                , position: 'static'
                , type: 'date'
                , theme: '#558AC0'
                , calendar: true
                , showBottom: false
                , mark: {
                    '0-12-31': '社休'
                }
            });
            $("#skill").click(function () {
                layui.data('model', {
                    key: 'model',
                    value: {
                        uid : '@Model.Id',
                        kind: 'JapLang',
                        sname: layui.data('user').user.username
                    }
                });   
                location.href = '@Url.Action("Detail", "Skill")';
            });
        });
    </script>
}